/** 工单动作枚举 @author dongls */
import BaseEnum from './BaseEnum';
import i18n from '@src/locales'

class TaskActionEnum extends BaseEnum{
  constructor(){
    super();

    this.CREATE = {
      name: i18n.t('common.base.create'),
      value: 'create'
    };

    this.START = {
      name: i18n.t('common.base.start'),
      value: 'start'
    };

    this.UPDATE = {
      name: i18n.t('task.record.modify'),
      value: 'update'
    };

    this.ADD = {
      name: i18n.t('common.base.update'),
      value: 'add'
    }

    this.ALLOT = {
      name: i18n.t('common.task.button.allot'),
      value: 'allot'
    };

    this.REDEPLOY = {
      name: i18n.t('common.task.exceptionStatus.allot'),
      value: 'redeploy'
    };

    this.ACCEPT = {
      name: i18n.t('common.task.button.accept'),
      value: 'accept'
    }

    this.REFUSE = {
      name: i18n.t('common.task.button.refuse'),
      value: 'refuse'
    }

    this.OFF = {
      name: i18n.t('common.base.cancel'),
      value: 'off'
    };

    this.FINISH = {
      name: i18n.t('common.base.finish'),
      value: 'finish'
    };

    this.CLOSE = {
      name: i18n.t('common.base.close'),
      value: 'close'
    }
    
    this.ROLLBACK = {
      name: i18n.t('common.task.button.back'),
      value: 'rollBack'
    }

    this.COST = {
      name: i18n.t('common.task.button.balance'),
      value: 'cost'
    }

    this.REVIEW = {
      name: i18n.t('task.detail.components.reviewAndClose'),
      value: 'review'
    }

    this.AUTOREVIEW = {
      name: i18n.t('task.taskTypes.review.autoReview'),
      value: 'autoReview'
    }

    this.PAUSE = {
      name: i18n.t('common.task.button.pause'),
      value: 'pause'
    }

    this.UNPAUSE = {
      name: i18n.t('common.task.button.continue'),
      value: 'unpause'
    }
  }
}

export default new TaskActionEnum();